//
//  JudgeUserLogInTool.m
//  1243
//
//  Created by 袖手旁觀 on 16/4/16.
//  Copyright © 2016年 1243. All rights reserved.
//

#import "JudgeUserLogInTool.h"
#import "ReadLoginData.h"
#import "LoginViewController.h"

@interface JudgeUserLogInTool () <UIAlertViewDelegate>

@end

@implementation JudgeUserLogInTool

+ (BOOL)JudgeUserLonInStatus {
    
    NSDictionary *dict = [ReadLoginData readLoginData];
    
    if (dict.count) {
        return YES;
    } else {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"请登录用户" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
//        alert.tag = 10011;
//        [alert show];
        
        return NO;
    }
    
}

//- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
//    NSLog(@"%ld",buttonIndex);
//    if (alertView.tag == 10011) {
//        if (buttonIndex == 1) {
//            LoginViewController *logIn = [[LoginViewController alloc] init];
//            [self presentViewController:logIn animated:YES completion:nil];
//        }
//    }
//}

@end
